<?php require_once SYSTEM . '/HTMLHelper.php';?>
<!--begin congtent -->
<div class="content">
    <!--begin offer-left-->
    <div class="offer-left">
        <div id="request_menu_2" class="offer-left-caption" onclick="divMenuOnclick('request_menu','2');">
            <div style="float: left; padding-left: 5px;">
                <a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Category</a>
            </div>
        </div>
        <div id="request_menu_sub_2" class="offer-left-menu" style="display: block;">
            <?php foreach($this->ViewData['listCat'] as $cat) { ?>
		    	<div class="offer-left-menu-cell">
		        	<a style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;" href="/Offer/ListOffer?category=<?php echo $cat['_id'] ?>"><?php echo $cat['Name']; ?></a>
		        </div>            
		    <?php } ?>
        </div>

        <div id="request_menu_3" class="offer-left-caption" onclick="divMenuOnclick('request_menu','3');">
            <div style="float: left; padding-left: 5px;">
                <a href="#" style="font-size: 14px; color: #5b8aff; font-weight: bold; text-decoration: none;">Top Location</a>
            </div>
        </div>
        <div id="request_menu_sub_3" class="offer-left-menu" style="display: block;">
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div>   
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
            <div class="offer-left-menu-cell">
                <a href="/Request/StateProvince?spId=8255&countryCode=VN" style="font-size: 12px; color: #718fb3; font-weight: bold; text-decoration: none;">H&#224; Nội (276)</a>
            </div> 
        </div>
    </div>
    <!--end offer-left-->
    <!--begin offer-right-->
    <div class="offer-right">
        <div class="offer-right-caption" style="margin-top: 10px">
            <div style="float: left; padding-left: 10px; width: 480px; padding: 5px;">
                <label style="font-size: 14px; color: #5b8aff; font-weight: bold">Create New Offer</label>
            </div>
        </div>
        <div class="offer-right-list-offer">
            <div id="OfferCreating" class="CreatingForm">
                <form method="post" action="/Want/EditWant" id="OfferForm" name="offerForm" onsubmit="return validateForm()" enctype="multipart/form-data">
	                <div style="width: 430px; height: 400px; float: left; background-color: White">
	                    <div style="width: 110px; float: left; margin-top: 10px; padding-left: 10px; padding-top: 5px;"><b>Name:</b></div>
	                    <div style="width: 300px; float: left; margin-top: 10px;">
	                        <input type="text" id="txtName" style="width: 260px" name="Name" value="<?php echo $this->Model['result']->Name; ?>" />
	                        <label style="color: red;">*</label>
	                    </div>
	                    <div style="width: 110px; float: left; margin-top: 10px; padding-left: 10px; padding-top: 5px;"><b>Category:</b></div>
	                    <div style="width: 300px; float: left; margin-top: 10px;">                       
	                        <select name="Category" id="slCat" style="width: 260px">
	                            <?php foreach ($this->ViewData['listCat'] as $docCat) { ?>
	                            	<option value="<?=$docCat['_id'];?>"><?=$docCat['Name'];?></option>
	                            <?php } ?>                                                                             
	                        </select>
	                        <label style="color: red;">*</label>
	                    </div>
	                    
	                    <div style="width: 110px; float: left; margin-top: 10px; padding-left: 10px; padding-top: 5px;"><b>Location:</b></div>
	                    <div style="width: 260px; float: left; margin-top: 10px;">
	                        <input type="text" id="txtStreet" style="width: 260px" name="Location" value="<?php echo $this->Model['result']->Location; ?>" />
	                    </div>
	                    <input type="hidden" value="" />
	                    <div style="width: 110px; float: left; margin-top: 10px; padding-left: 10px; padding-top: 5px;"><b>Description:</b></div>
	                    <div style="width: 260px; float: left; margin-top: 10px;">
	                        <textarea id="txtDescription" cols="30" rows="11" style="overflow: auto" name="Description"><?php echo $this->Model['result']->Description; ?></textarea>
	                    </div>
	                </div>
	                <div style="width: 300px; height: 300px; float: left; background-color: White">
	                    <img id="ItemImage" alt="/" width="150" height="150" style="margin-left: 100px; margin-top: 40px"  src="<?php echo UPLOAD.'/Want'.$this->Model['result']->Image ;?>" />
	                    <input id="OfferImage" type="file" name="file" style="width: 260px; height: 25px;margin-top: 50px; margin-left: 50px;" />
	                    <input type="hidden" name="kind" value="Offer" />
	                    <input type="hidden" name="olderImage" id="olderImage" />
	                </div>
                   <input type="hidden" name="wantID" value="<?php echo $this->Model['result']->ID; ?>"/>
	                <div style="width: 630px; height: 100px; background-color: White">
	                    <input type="submit" id="btSubmit" name="edit" style="margin-left: 300px; margin-top: 10px; float: left" value="Edit" />
	                </div>
                </form>
            </div>
        </div>
    </div>
    <div style="background-color: #5a8aff; height: 20px; width: 960px; float: left;"></div>
</div>